package com.sensologyhome_all.eventbus;


import org.greenrobot.eventbus.EventBus;

public class EventBusUtil {
	
	/**
	 * 注册EventBus
	 * @param subscriber
	 */
	public static void registerEventBus(Object subscriber){
		EventBus.getDefault().register(subscriber);
	}
	/**
	 * 解除EventBus的注册
	 * @param subscriber
	 */
	public static void unregisterEventBus(Object subscriber){
		EventBus.getDefault().unregister(subscriber);
	}
	
	/**
	 * 分发事件:使用对象传递数据
	 * @param event
	 */
	public static void postEvent(Object event){
		EventBus.getDefault().post(event);
	}
}
